import requests



# 登录接口
url = "http://127.0.0.1:5000/api/login"
data = {"username": "hami", "password": "123456", "type": "username"}
res = requests.post(url=url, json=data)
print(res.json())
# 查看用户信息
url = "http://127.0.0.1:5000/api/info"
headers = {"token": "bd80726708856645618cfb2a5a6926d2"}
res = requests.get(url=url, headers=headers)
print(res.json())

